//
//  LSZNoticeTableViewCell.m
//  JKFuYinProject
//
//  Created by 九酷 on 2018/8/27.
//  Copyright © 2018年 LC. All rights reserved.
//

#import "LSZNoticeTableViewCell.h"

@implementation LSZNoticeTableViewCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        CGFloat height = [LSZSpecialPackaging initWithReturnsthesizeOf:70 :5];

        self.imageViewIcon = [[UIImageView alloc]init];
        self.imageViewIcon.frame = CGRectMake(15, 10, height-30, height-30);
        [self addSubview:self.imageViewIcon];

        CGFloat heightTitle = [LSZSpecialPackaging initWithReturnsthesizeOf:20 :2];
        self.labelTitle = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(self.imageViewIcon.frame)+10, CGRectGetMinY(self.imageViewIcon.frame), ScreenWidth/2, heightTitle)];
        self.labelTitle.textColor = titleColorLSZ;
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelTitle font:15];
        [self addSubview:self.labelTitle];

        self.labelNumber = [[UILabel alloc]init];
        self.labelNumber.textAlignment = NSTextAlignmentCenter;
        self.labelNumber.frame = CGRectMake(ScreenWidth-10-self.imageViewIcon.frame.size.height-10, CGRectGetMinY(self.imageViewIcon.frame)+5,self.imageViewIcon.frame.size.height-10, self.imageViewIcon.frame.size.height-10);
        self.labelNumber.backgroundColor = redUIColor;
        self.labelNumber.textColor = [UIColor whiteColor];
        [self.labelNumber.layer setMasksToBounds:YES];
        [self.labelNumber.layer setCornerRadius:self.labelNumber.frame.size.height/2];
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelNumber font:13];
        [self addSubview:self.labelNumber];

        self.labelTime = [[UILabel alloc]init];
        self.labelTime.frame = CGRectMake(CGRectGetMaxX(self.labelTitle.frame), CGRectGetMinY(self.imageViewIcon.frame), ScreenWidth-CGRectGetMaxX(self.labelTitle.frame)-10, 20);
        self.labelTime.textColor = lightColor;
        self.labelTime.textAlignment = NSTextAlignmentRight;
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelTime font:13];
        self.labelTime.hidden = YES;
        [self addSubview:self.labelTime];

        CGFloat heightExplain = [LSZSpecialPackaging initWithReturnsthesizeOf:18 :2];
        self.labelExplain = [[UILabel alloc]init];
        self.labelExplain.textColor = lightColor;
        [LSZSpecialPackaging setLabelAdaptiveSize:self.labelExplain font:13.5];
        self.labelExplain.frame = CGRectMake(CGRectGetMaxX(self.imageViewIcon.frame)+10, CGRectGetMaxY(self.imageViewIcon.frame)-heightExplain, ScreenWidth-CGRectGetMaxX(self.imageViewIcon.frame)-20, heightExplain);
        [self addSubview:self.labelExplain];

    }
    return self;
}

@end
